package com.mhkj.workflow.controller;

import java.io.IOException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.mhkj.workflow.entity.WorkFlowLogger;
import com.mhkj.workflow.service.WorkFlowLoggerService;

@Component
public class QuartzService {

	@Autowired
	private WorkFlowLoggerService service;

	
	//  定时任务
	@Scheduled(cron = "0 0/5 * * * ?")
	public void timerToNow() throws IOException{
	      
	    List<WorkFlowLogger> list=service.getWorkFlowListForOk();
		HttpClientUtils httpClientUtils= new HttpClientUtils();
		httpClientUtils.getActivityState(service,list);
	}
}
